package com.lagou.sqlsession;


import java.sql.Connection;
import java.sql.SQLException;

public interface Transaction {
    /**
     * 获取数据连接
     * @return
     * @throws SQLException
     */
    Connection getConnection() throws SQLException;

    /**
     * 提交事务
     * @return
     * @throws SQLException
     */
    void commit() throws SQLException, SQLException;

    /**
     *
     * @throws SQLException
     */
    void rollback() throws SQLException;


}
